package com.example.demo01.mapper;

import com.example.demo01.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Mapper
@Repository
public interface UserMapper {
    Optional<User> findUserByName(String username);

    User getUserByName(String username);



    List<User> getAllUsers();


    void updatePostTimeByName(String username);

    void freezeUser(String username);


    void updateActiveWithFalse(String username);

    void updateActiveWithTrue(String username);

    List<User> getAllAdmins();

    void addUser(User user);

}
